﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Marmat.Extensions;

namespace EasyMarmat
{

    /// <summary>
    /// 基于Microsoft.Extensions.DependencyInjection实现的命令工厂
    /// </summary>
    public class ServiceCommandFactory : ICommandFactory, IProvider
    {
        /// <summary>
        /// 获取接口对应的服务实例
        /// </summary>
        /// <typeparam name="TInterface"></typeparam>
        /// <returns></returns>
        TInterface ICommandFactory.GetService<TInterface>()
        {
            return this.GetService<TInterface>();
        }
    }
}
